package org.eiahe.hr.salary.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.core.xss.Xss;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.salary.domain.SalaryImportRecord;

/**
 * 薪资导入记录业务对象 hr_salary_import_record
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SalaryImportRecord.class, reverseConvertGenerate = false)
public class SalaryImportRecordBo extends BaseEntity {

    /**
     * 导入记录ID
     */
    @NotNull(message = "导入记录ID不能为空", groups = { EditGroup.class })
    private Long recordId;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 工号
     */
    @NotBlank(message = "工号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String employeeNo;

    /**
     * 员工姓名
     */
    @NotBlank(message = "员工姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String employeeName;

    /**
     * 年月(yyyyMM格式)
     */
    @NotBlank(message = "年月不能为空", groups = { AddGroup.class, EditGroup.class })
    private String yearMonth;

    /**
     * 导入文件名
     */
    private String fileName;

    /**
     * 导入状态(0待处理 1处理中 2成功 3失败)
     */
    private String importStatus;

    /**
     * 总记录数
     */
    private Integer totalRecords;

    /**
     * 成功记录数
     */
    private Integer successRecords;

    /**
     * 失败记录数
     */
    private Integer failedRecords;

    /**
     * 错误信息
     */
    @Xss(message = "错误信息不能包含脚本字符")
    private String errorMessage;

    /**
     * 备注
     */
    @Xss(message = "备注不能包含脚本字符")
    private String remark;
}